import Vue from 'vue'
import Router from 'vue-router'
//组件
import login from '../components/login/login'
import index from '../components/index/index'
import register from '../components/register/register'
import updatepwd from '../components/register/updatepwd'
import guibinting from '../components/guibinting/guibinting'
import guibindetail from '../components/guibinting/guibindetail'
import tijiaodingdan from '../components/guibinting/tijiaodingdan'
import xuyuyue from '../components/guibinting/xuyuyue'
import order from '../components/order/order'
import allorderdetail from '../components/order/allorderdetail'
import orderdetailyuyue from '../components/order/orderdetailyuyue'
import orderdetailnoyuyue from '../components/order/orderdetailnoyuyue'
import submitorder from '../components/order/submitorder'
import payresult from '../components/order/payresult'
import guibintongdao from '../components/guibintongdao/guibintongdao'
import invite from '../components/invite/invite'
import myinvite from '../components/invite/myinvite'
import myagent from '../components/agent/myagent'
import setAgentPrice from '../components/agent/setAgentPrice'
import selectAgentPrice from '../components/agent/selectAgentPrice'
import addAgentPrice from '../components/agent/addAgentPrice'
import mywallet from '../components/wallet/mywallet'
import recharge from '../components/recharge/recharge'
import rechargeorder from '../components/recharge/rechageorder'
import subuseinfo from '../components/accountgoods/subuseinfo'

Vue.use(Router);


export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login,
      meta: {
        title: '代理商登录',
        isAuth: false
      }
    },
    {
      path: '/register',
      name: 'register',
      component: register,
      meta: {
        title: '代理商注册',
        isAuth: false
      }
    },
    {
      path: '/updatepwd',
      name: 'updatepwd',
      component: updatepwd,
      meta: {
        title: '修改密码',
        isAuth: true
      }
    },
    {
      path: '/index',
      name: 'index',
      component: index,
      meta: {
        title: '代理商首页',
        isAuth: true
      }
    },
    {
      path: '/guibinting',
      name: 'guibinting',
      component: guibinting,
      meta: {
        title: '贵宾厅',
        isAuth: true
      }
    },
    {
      path: '/guibindetail',
      name: 'guibindetail',
      component: guibindetail,
      meta: {
        title: '贵宾厅详情',
        isAuth: true
      }
    },
    {
      path: '/xuyuyue',
      name: 'xuyuyue',
      component: xuyuyue,
      meta: {
        title: '贵宾厅预约',
        isAuth: true
      }
    },
    {
      path: '/order',
      name: 'order',
      component: order,
      meta: {
        title: '我的订单',
        isAuth: true
      }
    },
    {
      path: '/submitorder',
      name: 'submitorder',
      component: submitorder,
      meta: {
        title: '提交订单',
        isAuth: true
      }
    },
    {
      path: '/payresult',
      name: 'payresult',
      component: payresult,
      meta: {
        title: '支付结果',
        isAuth: true
      }
    },
    {
      path: '/allorderdetail',
      name: 'allorderdetail',
      component: allorderdetail,
      meta: {
        title: '订单详情',
        isAuth: true
      }
    },
    {
      path: '/orderdetailyuyue',
      name: 'orderdetailyuyue',
      component: orderdetailyuyue,
      meta: {
        title: '订单详情',
        isAuth: true
      }
    },
    {
      path: '/orderdetailnoyuyue',
      name: 'orderdetailnoyuyue',
      component: orderdetailnoyuyue,
      meta: {
        title: '订单详情',
        isAuth: true
      }
    },
    {
      path: '/tijiaodingdan',
      name: 'tijiaodingdan',
      component: tijiaodingdan,
      meta: {
        title: '提交订单',
        isAuth: true
      }
    },
    {
      path: '/guibintongdao',
      name: 'guibintongdao',
      component: guibintongdao,
      meta: {
        title: '贵宾通道',
        isAuth: true
      }
    },
    {
      path: '/invite',
      name: 'invite',
      component: invite,
      meta: {
        title: '邀请下级',
        isAuth: true
      }
    },
    {
      path: '/myinvite',
      name: 'myinvite',
      component: myinvite,
      meta: {
        title: '我的下级',
        isAuth: true
      }
    },
    {
      path: '/myagent',
      name: 'myagent',
      component: myagent,
      meta: {
        title: '我的代理',
        isAuth: true
      }
    },
    {
      path: '/setAgentPrice',
      name: 'setAgentPrice',
      component: setAgentPrice,
      meta: {
        title: '价格组设置',
        isAuth: true
      }
    },
    {
      path: '/selectAgentPrice',
      name: 'selectAgentPrice',
      component: selectAgentPrice,
      meta: {
        title: '价格组选择',
        isAuth: true
      }
    },
    {
      path: '/addAgentPrice',
      name: 'addAgentPrice',
      component: addAgentPrice,
      meta: {
        title: '新增价格组',
        isAuth: true
      }
    },
    {
      path: '/mywallet',
      name: 'mywallet',
      component: mywallet,
      meta: {
        title: '我的钱包',
        isAuth: true
      }
    },
    {
      path: '/recharge',
      name: 'recharge',
      component: recharge,
      meta: {
        title: '余额充值',
        isAuth: true
      }
    },
    {
      path: '/rechargeorder',
      name: 'rechargeorder',
      component: rechargeorder,
      meta: {
        title: '充值订单',
        isAuth: true
      }
    },
    {
      path: '/subuseinfo',
      name: 'subuseinfo',
      component: subuseinfo,
      meta: {
        title: '填写使用人信息',
        isAuth: true
      }
    }
  ]
})
